class CreateUsers < ActiveRecord::Migration
  def self.up
    create_table :users do |t|
      t.column :role_id, :int
      t.column :address_id, :int
      t.column :username, :string, :limit => 10, :unique => true, :null => false
      t.column :hashed_password, :string, :null => false
      t.column :salt, :string
      t.column :first_name, :string, :limit => 50
      t.column :last_name, :string, :limit => 50
      t.column :email, :string
      t.column :deleted, :boolean, :default => false 
      t.column :created_at, :datetime
      t.column :updated_at, :datetime      
    end
  end

  def self.down
    drop_table :users
  end
end
